package com.bw.unit3.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.Query
import com.bw.unit3.bean.LoginBean
import com.bw.unit3.bean.UserInfoEntity

/**
 *
 * @ClassName: LoginDao
 * @Description: 提供login表增删改查 的方法
 * @Author: zhangyanchao
 * @CreateDate: 2024/9/13 11:58 AM
 * @Version: 1.0
 */
@Dao
interface UserInfoDao {
    //添加
    @Insert(onConflict = REPLACE)// 处理重复添加
    fun insertUserInfoEntity(loginBean: UserInfoEntity)

    @Query("select * from login_user")
    fun getUserInfoEntity(): UserInfoEntity

    @Query("delete from login_user")
    fun deleteUserInfoEntity()
}